package flc.ast.adapter;

import android.graphics.Bitmap;
import android.widget.ImageView;

import androidx.annotation.NonNull;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.provider.BaseItemProvider;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import flc.ast.R;
import flc.ast.utils.BitmapUtil;
import stark.common.basic.adaptermutil.StkProviderMultiAdapter;
import stark.common.basic.adaptermutil.StkSingleSpanProvider;
import stark.common.bean.StkExchangeRateBean;

public class RateAdapter extends StkProviderMultiAdapter<StkExchangeRateBean> {

    public RateAdapter() {
        addItemProvider(new StkSingleSpanProvider(30));
        addItemProvider(new RateProvider());
    }

    private class RateProvider extends BaseItemProvider<StkExchangeRateBean> {
        @Override
        public int getItemViewType() {
            return StkProviderMultiAdapter.TYPE_VIEW;
        }

        @Override
        public int getLayoutId() {
            return R.layout.item_rate;
        }

        @Override
        public void convert(@NonNull BaseViewHolder baseViewHolder, StkExchangeRateBean bean) {
            baseViewHolder.setText(R.id.tvRateItemName, bean.name);
        }
    }
}
